"""
@Time : 2022/7/30 11:07 
@Author : ls
@DES: 
"""
import numpy
from typing import List


class A(object):
    # pass
    age: int = 1
    name: str = "tom"


a_list: List[A] = []
b_list = [[[1, 1, 1], [2, 2, 2]], [[3, 3, 3], [4, 4, 4]]]
bb = numpy.array(b_list)

for i in range(5):
    a = A()
    a.age = i
    a.bytes_buffer = bytes()
    a.array = list()
    a_list.append(a)

a.bytes_buffer += b'\x01'

ll = a.array
a_byte = numpy.frombuffer(b'\x00\x01\x00\x01\x00\x01\x00\x01', dtype=numpy.int16).reshape(-1, 4)
div = numpy.array([100, 100])
radar_cloud_ndarray = numpy.divide(a_byte, div)
radar_cloud_ndarray = radar_cloud_ndarray.astype(numpy.float16)
ll.append(a_byte)
b_byte = numpy.frombuffer(b'\x00\x01\x02\x03', dtype=numpy.int16).reshape(-1, 2)
ll.append(b_byte)
c_byte = numpy.frombuffer(b'\x08\x09\x10\x11', dtype=numpy.int16).reshape(-1, 2)
ll.append(c_byte)

hh = numpy.concatenate(ll, axis=0)
print(a_list)
b = A()
b.name = 'jerry'
print(b)

d = {}
d[1] = b'hello'
d[2] = b'world'
d[1] += b' tom'
print(d)
